<%@page import="Model.Product.ProductList"%>
<%@page import="RssEasy.Core.CookieHelper"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
   CookieHelper cookie = new CookieHelper(request, response);
    if (cookie.Get("account") == null || cookie.Get("account") == "") {
        response.sendRedirect("/login/login.jsp");
    }
    ProductList plt = new ProductList(pageContext);
    plt.select();
%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>企企通-空间管理-产品管理</title>
        <meta name="description" content="这里写网站内容描述" />
        <meta name="keywords" content="这里写关键词" />
        <meta name="Robots" contect="all">
        <link href="/css/reset.css" rel="stylesheet" type="text/css" />
        <link href="css/swfupload.css" rel="stylesheet" type="text/css"/>
        <link href="css/product.css" rel="stylesheet" type="text/css"/>
    </head>
    <body>
        <h1>产品管理</h1>
        <ol id="pro">
            <li class="greensy">发布新产品</li>
            <li>产品管理</li>
        </ol>
        <ul id="tagpic">
         <li  class="greensy">
             <form id="product" method="post" class="product" >
            <div>
                <h3>填写产品信息</h3>
            <table>
                <tr><td>产品名称：</td><td><input id="name" type="text" name="name"  placeholder="请输入产品名称"/><label for="name"></label></td></tr>
                <tr><td>价格：</td><td><input id="ptprice" type="text" name="ptprice"  placeholder="请输入价格"/><label for="ptprice"></label></td></tr>
                <tr><td>库存量：</td><td><input id="inventory" type="text" name="inventory"  placeholder="请输入数量" /><label for="inventory"></label></td></tr>
                <tr><td>产地：</td><td><input id="ptplace" type="text" name="ptplace"  placeholder="请输入产地"/><label for="ptplace"></label></td></tr>
            </table>
             </div>
                <h3>详细信息</h3>
            <table>
                <tr><td>品牌名称：</td><td><input id="brandnames" type="text" name="brandnames"  placeholder="请输入品牌名"/><label for="brandnames"></label></td></tr>
                <tr><td>型号：</td><td><input id="ptmodel" type="text" name="ptmodel"  placeholder="请输入型号"/><label for="ptmodel"></label></td></tr>
                <tr><td>制造商：</td><td><input id="manufacturers" type="text" name="manufacturers"  placeholder="请输入制造商"/><label for="manufacturers"></label></td></tr>
                <tr><td>规格参数：</td><td><input id="parameters" type="text" name="parameters"  placeholder="请输入规格参数"/><label for="parameters"></label></td></tr>
                        <tr>
                        <td class="tr w60">产品图片：</td>
                        <td>
                            <ul id="icourlwrap" class="swfuploadwrap">
                                <li><div class="swfuploadimg"><div><img src="<% out.print(plt.get("pt") != null ? "/upfile/" + plt.get("pt") : "/img/white.gif");  %>"></div></div></li>
                            </ul>
                            <div>
                                <span swfupload="icourlswf" config="{multimode:0,fileType: [['图形图像(*.jpg;*.png;*jpeg)','*.jpg;*.png;*jpeg']]}"></span>
                                <br />  
                                请您提供清晰的图片，格式为JPEG，BMP，PNG，图片小于5M！
                            </div>
                                <input  type="hidden" id="ico"  name="pt" value="<% plt.write("pt"); %>"/>
                        </td>
                    </tr>
            </table> 
         <button type="button">确定</button>
         </form>
         </li>
          <li>
              <form method="post">
              <div class="headersh">
                  <label for="">产品搜索：</label><input type="text" id="keysearch" placeholder=" &nbsp;&nbsp;产品名称搜索" name="name" value="<% plt.write("name"); %>" />
              <select id="category">
                  <option value="">全部</option>
                  <option value="1">审核中</option>
                  <option value="2">已通过</option>
                  <option value="3">未通过</option>
              </select>
              <button id="searchpt" type="button">搜索</button>
              </div>
              <table id="bttable">
                   <thead>
                      <tr class="trstyle"><td class="tdnone">产品名称</td>
                      <td class="tdnone">图片</td>
                      <td class="tdnone">审核状态</td>
                      <td class="tdnone">上传时间</td>
                      <td class="tdnone">操作</td></tr>
                  </thead>
                  <tbody id="participation">
                  <tr class="content1"><td><% plt.write("name"); %></td>
                      <td><img src="/upfile/<% out.print(plt.get("pt")); %>" style="width: 150px;height: 100px;" alt=""/></td>
                      <td class="statesy" ptstate="<% plt.write("ptstate"); %>"></td>
                      <td rssdate="<%=plt.get("ptupdate")%>,yyyy-MM-dd"></td>
                      <td class="delete" value='<%plt.write("id");%>'>删除</td></tr>
                   </tbody>
              </table>
       <div id="page">
            <a href= "javascript:void(0);" id="first" onclick ="first()" sort="">首页</a>
            <a href= "javascript:void(0);" id="previous" onclick ="previous()" sort="">上一页</a>
            <a><b>1</b>/<b></b></a>
            <a href= "javascript:void(0);" id="next" onclick ="next()" sort="">下一页</a>
            <a href= "javascript:void(0);" id="last" onclick ="last()" sort="">尾页</a>
            <a>跳转</a>
            <input type="text" name="jump" value=""/>
            <a href= "javascript:void(0);" id="jump" onclick ="jump()" sort="">确定</a>
        </div>
              </form>
          </li>
        </ul>
        <%@include file="/inc/js_all.html" %>
        <script src="/data/dictdata.js" type="text/javascript"></script>
        <script src="js/product.js" type="text/javascript"></script>
        <script src="js/upload.js" type="text/javascript"></script>
    </body>
</html>